define(function(require){
	
		var Model = function(){
			//this.callParent();		
		};
		
		//判断密码是否符合要求
		//以字母开头，长度在6~18之间，只能包含字符、数字和下划线
		Model.testPassword = function(password){
			var pattern = /^[a-zA-Z]\w{5,17}$/;
			return pattern.test(password);
		};
		
		//判断用户名是否符合要求
		//字母开头，允许5-16字节，允许字母数字下划线
		Model.testUserName = function(name){
		
			var pattern = /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/;
			return pattern.test(name);
		};
		
		//验证邮箱
		Model.testEmail = function(email){
			var pattern = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
			return pattern.test(email);
		};
		
		//验证电话号码
		Model.testPhone = function(phone){
			var pattern = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/;
			return pattern.test(phone);
		};
		
		
		//验证姓名是否为中文
		Model.testName  = function(name){
			var pattern = /^[\u4e00-\u9fa5]{2,}$/;
			return pattern.test(name);
		};
		
		//验证手机号码格式
		Model.testMobile = function(mobile){
			var pattern = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
			return pattern.test(mobile);
		
		};
		
		return Model;
});
